package com.example.common.exception;

import com.example.common.core.ResultCode;
import lombok.Getter;

@Getter
public class ServiceException extends RuntimeException {
    private final String message;
    private final int code;

    public ServiceException(ResultCode resultCode) {
        this(resultCode.getCode(), resultCode.getMessage());
    }

    public ServiceException(int code, String message) {
        super(message);
        this.message = message;
        this.code = code;
    }
}
